# Snak adaptation 1.1. Removed handlers that emit conflicting messages and usually made '-'
# Snak adaptation 1.2. Removed unnecessary checks for the correctness of ischanop
# Snak adaptation 1.3. Removed pp.snm and calls to it as Snak does integrated highlighting
# Snak adaptation 1.4. Removed pp.formecho in priv msg and notice handlers as it conflicts with normal message formatting
# Removed //who when joining channel and message formatting in /who handler
# Removed handlers for mesages 432 and 433 as Snak already does this
# Removed message in notify_signon, and made it let Snak continue processing
# Change order of handler and exec because execs are handled directly - not handed to the OS
# The wait -CMD %<process> returns immediately as true
# Removed CTCP handlers for ping, version, finger as Snak already does this
# Modified dcc.ucmd.offer so that it asks properly for one or more files
# dcc.ucmd.offer uses a variation on /input which asks for files
# Because Mac files can contain spaces, the resulting list is separated by tabs, so
# a new function "listitem" is used instead of "word"
# Removed fileexist from pp-dcc.irc alias and made a built in function
# "Press ENTER to continue" in doechos removed..Snak can scoll.
# /dcc save <file> saves package file in the scripts directory
# /dcc notice now only sends to the current channel, not all channels.
# Snak adaptation 1.5 the fileserver (/pphelp dcc) now works. Most changes consists of using listitem instead of word
# Snak adaptation 1.6 Snak does its own DCC Autoaccept
# Furthermore, the purepak dcc code does not always work because it assumes that there are no spaces
# in the filename. If there is then $6 will be incorrect and the script fails.
# Snak adaptation 1.7 added special "window log_extrainfo off" flag to window creation so that Snaks text logger will
# not write "server:" or "info:" before each line. This affects /sve and /dcc.ucmd.save
# Removed Purepak 333 topic intercept as it interferes with Snak topic handling
# Removed unnecessary (and incorrect) PurePak redefinition of the say alias
# Snak adaptation 1.8 Snak will PING itself every 90 seconds if there is no traffic, so disable the purepak on raw handler
# that listens for PONG
# Snak adaptation 1.9 Remove signoff handler
# Snak adaptation 1.10 Removed all places that used the PP.USERS. The maintenance of a separate list of users by the script made
# it impossible to use PurePak on a large channel (500-1000) users. It was only used for fmdop (fast mass deop) and users.
# If there is any demand, I will reimplement fmdop and users in the program itself. users if useful for finding channel members with a particular host mask.
# Snak adaptation 1.11 Make sve function use the new rm, mkdir, write and close functions. remove unnecesary rm alias in pp.
# Make PP store its settings files in a subdirectory in the home directory. removed unused load_path
# Removed unnecessary load overrive which supported compressed files
# Removed unnecessary duplication of the notify list
# Removed unflash, mail and uumail. Not relevant on a Mac
# Removed many of the variables that purepak sets up. They were used in the original ircII client but have no effect in Snak.
# Removed references to beep_on_msg. Snak doesn't use that.
# The pp.savedfrom function is not necessary, but it is left present since it is called when loading a settings file.
# Removed the repeatcmd function. It was a duplicate of a command in the basical script file which is always loaded.
# Disabled the automatic loading of pp-bots. DCC Raw is not supported.
# sendto now uses say with a -t parameter so that the ascii art output looks better
# Took out the tabkey message history. Snak already has this built it.
# Removed the getuh alias. Snak 5 contains getuh as a built in function so that PP can access the userhost directly without h
# having to maintain the UHOSTCACHE
# Fixed minor bug in the /avoid command where it would not detect if a nick was already on the avoid list
# Removed setmformat. Snak controls the message format through user preferences.
# Removed the setting of number of lines in the display. Snak can scroll.
# Removed the paging system in pp.pauseset, pp.pauseend and pp.doechos. Snak scrolls just fine.
# Disabled the automatic nslookup
# Removed logging to a file while away. Snak can scroll.
#
# To automatically load this into a connection, add "/load purepak.irc" to the startup actions.
# ^timer 30 /echo *** Your old friends/enemies lists from your previous version of PurePak have been added to the 'global' friends/enemies lists in this version. You should /sve now to save the lists in the new format. (Type /lsfriends and /lsenemies to check your lists)
# ^timer 30 /echo *** There have been changes to the saved file format. Auto-converted, but you should /sve now so you don't see this message again.
# }
# }
# ^timer 5 ^alias -pp.savedfrom
}
# So the "IRC log started ..." comments in the logfile do nothing
alias IRC {}
alias pphelp {
if ([$0]) {
if (!(PPHELP.HELP))
{
//^load purepak.hlp
if (!(PPHELP.HELP)) {/echo *** Error loading purepak.hlp: check to make sure that the file exists and is in a directory where it can be found.} {/pphelp $*}
}
{
@ PP.HELPLASTUSED = time()
if ([$1]) {@ EN = [$0_$1]} {@ EN = [$0]}
if (!(PPHELP[$EN][0])) {/echo *** No help available on '$*'}
{
echo *** Help: $*
foreach PPHELP.$EN AA {/echo -- $PPHELP[$EN][$AA]}
echo --
}
^assign -EN
}
} {/pphelp HELP}
}
alias lockmode {
if ([$0])
{
if (!ischannel($0)) {/echo *** /lockmode <#channel> <mode(s) to lock/off>}
{
if ([$1])
{
if ([$1] == [OFF])
{
if (!(LOCKEDMODES[$encode($0)])) {/echo *** No modes are locked on $0}
{
^assign -LOCKEDMODES[$encode($0)]
if (gotops($0))
{
if (index(W $PP.SET) >= 0)
{
if ([$0] == C) {/me : Mode no longer locked} {/describe $0 : Mode no longer locked}
}
}
echo *** Mode on channel $0 no longer locked
}
}
{
if (rmatch($1 *-* *o* *v*)) {/echo *** Cannot lock that mode. /pphelp lockmode for help.}
{
^assign LOCKEDMODES[$encode($0)] $1-
if (gotops($0))
{
if (index(W $PP.SET) >= 0)
{
if ([$0] == C) {/me : Mode locked to: $1-} {/describe $0 : Mode locked to: $1-}
# Snak adaptation 1.4 pp.formecho removed as it conflicts with normal message formatting
# removed ^ to let Snak process the message
on notice * {
@ PP.LNOTICE = [$USERHOST() $*]
if ((!!(A))&&(index(G $PP.SET) >= 0)) {^pp.awaylog $time() NOTICE $USERHOST() $*}
}
# Make some notices look better and be more informative
on ^482 * {^if ([$0] != S) {/echo *** You are desynched on $1 \(from server $0\)} {/echo *** You are not channel operator on $1}}
on ^442 * {^if ([$0] != S) {^if (match($1 $mychannels())) {/echo *** You are desynched: server $0 doesn't think you are on channel $1} {/echo *** You are not on channel $1 \(from server $0\)}} {/echo *** You are not on channel $1}}
on ^465 * {/echo *** You are banned (K-lined) from server $0}
# Snak adaptation 1.7 Removed
# on ^333 * {^if (!match(*.* $2)) {/echo *** Topic was set on $1 by $2 at $stime($3)}}
on ^375 * {^if ((suppress_server_motd != [ON])||(PP.SEENMOTD)) {/echo ++ $1-}}
on ^372 * {^if ((suppress_server_motd != [ON])||(PP.SEENMOTD)) {/echo -- $1-}}
on ^376 * {@ PP.SEENMOTD = 1}
EVAL ^if (PP.EPIC) {
on ^323 * {}
on ^376 * {}
on ^219 * {}
}
# Snak adaptation 1.1 Removed
# on ^leave * {/xecho -level CRAP *** $0 has left channel $1}